home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / ilisp / ilisp-chs.el.z / ilisp-chs.el
Encoding:
Text File  |  1998-05-21  |  1.7 KB  |  58 lines

  1. ;;; -*- Mode: Emacs-Lisp -*-
  2.  
  3. ;;; ilisp-chs.el --
  4.  
  5. ;;; This file is part of ILISP.
  6. ;;; Version: 5.8
  7. ;;;
  8. ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
  9. ;;;               1993, 1994 Ivan Vasquez
  10. ;;;               1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
  11. ;;;               1996 Marco Antoniotti and Rick Campbell
  12. ;;;
  13. ;;; Other authors' names for which this Copyright notice also holds
  14. ;;; may appear later in this file.
  15. ;;;
  16. ;;; Send mail to 'ilisp-request@naggum.no' to be included in the
  17. ;;; ILISP mailing list. 'ilisp@naggum.no' is the general ILISP
  18. ;;; mailing list were bugs and improvements are discussed.
  19. ;;;
  20. ;;; ILISP is freely redistributable under the terms found in the file
  21. ;;; COPYING.
  22.  
  23.  
  24. ;;;
  25. ;;; CLISP Common Lisp by Bruno Haible and XX Stoll dialect definition
  26. ;;;
  27.  
  28. ;;; clisp-hs-check-prompt doesn't after the first break because the
  29. ;;; number of ">" characters doesn't increase.
  30.  
  31. (defun clisp-hs-check-prompt (old new)
  32.   "Compare the break level printed at the beginning of the prompt."
  33.   (let* ((was-in-break (and old (string-match "Break>" old)))
  34.       (old-level (if was-in-break
  35.              (- (match-end 0) (match-beginning 0))
  36.              0))
  37.       (is-in-break (string-match "Break>" new))
  38.       (new-level (if is-in-break
  39.              (- (match-end 0) (match-beginning 0))
  40.              0)))
  41.     (<= new-level old-level)))
  42.  
  43. ;;;
  44. (defdialect clisp-hs "CLISP H.S." clisp
  45.   (setq comint-prompt-regexp "^\\([0-9]+\\. Break>\\|>\\)"
  46.         ilisp-error-regexp "^\\*\\* "
  47.         ilisp-binary-extension "fas"
  48.         comint-fix-error "Abort"
  49.         comint-continue "Continue"
  50.     comint-prompt-status
  51.     (function
  52.      (lambda (old line)
  53.        (comint-prompt-status old line 'clisp-hs-check-prompt)))))
  54.  
  55. (if (not clisp-hs-program) (setq clisp-hs-program "clisp"))
  56.  
  57. (provide 'ilisp-chs)
  58.